package cn.ztelovecly.springboot.framework.util;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

public class TypeTransferUtil<T> {

	public T transfer(Object object,Class<T> clazz) {

        JSONObject obj = JSON.parseObject(JSON.toJSONString(object));
        T t = JSON.toJavaObject(obj, clazz);
        return t;
	}
}
